<style>
   /*  */
    .wxPay_container{
        width:100%;
        height:100%;
        background-color:rgba(0,0,0,0.3);
        position: fixed;
        top:0;
        left:0;
        z-index: 99;
        display: none;
    }
    .wxPay_wrap{
        font-size:14px;
        width:90%;
        border-radius: 10px;
        position: absolute;
        left:50%;
        top:50%;
        transform: translate(-50%,-50%);
        -moz-transform: translate(-50%,-50%);
        -ms-transform: translate(-50%,-50%);
        -webkit-transform: translate(-50%,-50%);
        -o-transform: translate(-50%,-50%);
        background-color:#ffffff;
    }
    .wxPay_title{
        color:#ffffff;
        background-color:#951F2B;
        text-align: center;
        padding:10px;
        border-top-left-radius: 10px;
        border-top-right-radius: 10px;
    }
    .wxPay_content{padding:10px;}

    .wxPay_info{
        background-color:#FCF2D9;
        padding:10px;
    }
    .I_left{width:60px;display: inline-block;}
    
    .birth{display: flex;}
    .I_right{display:flex;flex-direction: column;width:100%;}
    .end_content{padding:15px 0;text-indent: 2em;}
    .wxPay_btn{
        width:60%;
        height:40px;
        line-height: 40px;
        text-align: center;
        color:#ffffff;
        background-color:#951F2B;
        border-radius:20px;
        margin:10px auto;
    }
    .close_bg{
        background:url('__PUBLIC__/images/public/close_.png') no-repeat;
        background-size:100% 100%;
        position: absolute;
        width:35px;
        height:35px;
        right:0;
        top:-18%;
    }
    /* 优惠券 */
    .discount_container{
        width:100%;
        height:100%;
        position: fixed;
        top:0;
        left:0;
        z-index: 99;
        display: none;
    }
    .discount_bg{
        width:100%;
        height:100%;
        position: absolute;
        background-color:rgba(0,0,0,0.7);
        top:0;left: 0;
    }
    .discount_container.on{display: block;}
    .discount_container.on .discount_content{animation:onShow 0.3s ease-out forwards;}
    @keyframes onShow{
        0%{opacity: 0;transform: scale(0.3);-webkit-transform: scale(0.3);}
        100%{opacity: 1;transform: scale(1);-webkit-transform: scale(1);}
    }
    .discount_content{
        width:6.6rem;
        height:7rem;
        background:url('__PUBLIC__/images/public/fyh_bj.png') 0% 0% / 100% 100% no-repeat;
        position: absolute;
        left:50%;
        margin-left:-3.3rem;
        top:15%;
    }
    .discount_txt{padding:0.88rem 0.65rem 0;}
    .discount_txt p{line-height: 1.5;color:#333333;font-size:0.34rem;}
    .discount_strong{color:#ec1212;font-weight: bold;}
    .discount_bottom{
        width:100%;
        height:2.26rem;
        background:url('__PUBLIC__/images/public/yhj_bj1.png') 0% 0% / 100% 100% no-repeat;
        position: absolute;
        z-index: 2;
        bottom:0;
        left:0;
        display: flex;
        justify-content: center;
        align-items: center;
        display: -webkit-box;
        -webkit-box-align: center;
        -webkit-box-pack: center;
    }
    .discount_container.on .discount_content .discount_coupon{
        animation:YHJonShow 0.3s ease-out 0.3s forwards;
    }
    @keyframes YHJonShow{
        0%{bottom:0rem;}
        100%{bottom:1.88rem;}
    }
    .discount_coupon{
        width:5.16rem;
        height:1.66rem;
        background:url('__PUBLIC__/images/public/fyh_yhj.png') 0% 0% / 100% 100% no-repeat;
        position: absolute;
        bottom: 0.01rem;
        left:50%;
        margin-left:-2.58rem;
        display: flex;
        display: -webkit-box;
        transition: all 0.3s ease-out 0.3s;
        z-index: 1;
        transform: translate3d(0,0,0);
        -webkit-transform: translate3d(0,0,0);
    }
    .discount_coupon .coupon_money{
        width:2rem;
        height:1.66rem;
        font-size:0.54rem;
        color:#fffacf;
        text-align: center;
        line-height:1.66rem;
    }
    .discount_coupon .coupon_money strong{font-size:1.08rem;}
    .discount_coupon .coupon_txt{
        flex: 1;
        -webkit-box-flex:1;
        text-align: center;
        line-height:1.66rem;
        font-size: 0.57rem;
        font-weight: bold;
        color:#fffacf;
        letter-spacing:0.1rem;
    }
    .discount_btn{
        width:2.78rem;
        height:0.98rem;
        margin-top:0.3rem;
        background:linear-gradient(#FF5F1F,#EF1C1C);
        background:-webkit-linear-gradient(#FF5F1F,#EF1C1C);
        text-align: center;
        line-height: 0.98rem;
        border-radius: 0.7rem;
        box-sizing: border-box;
        font-size:0.4rem;
        color:#ffffff;
        font-weight:bold;
        display: block;
    }
    .discount_btn:nth-child(2){
        margin-left:0.3rem;
        background:none;
        color:#333333;
        border:0.02rem solid #ec1212;
    }
    .discount_close{
        width:0.64rem;
        height:0.64rem;
        background:url('__PUBLIC__/images/public/close_.png') 0% 0% / 100% 100% no-repeat;
        position: absolute;
        top:-0.64rem;
        right:0rem;
    }
    /* 提示分享 */
    .ts_tc_container{
        width:100%;
        height:100%;
        background-color:rgba(0,0,0,0.5);
        position: fixed;
        top:0;left:0;
        z-index: 99;
        display: none;
    }
    .ts_tc_bg{
        width:100%;
        height:300px;
        background:url('__PUBLIC__/images/public/mg_share.png') no-repeat;
        background-size:100% 100%;
    }
    .ts_tc_contnet{
        font-size:18px;
        color:#ffffff;
        padding:180px 130px 30px 90px;
        text-align: center;
    }
	
	.daqs_tcbg, .daqs_tcbg2,.daqs_tcbg3{
		width: 100%;
		height: 100%;
		position: fixed;
		top: 0;
		left: 0;
		background-color: rgba(0,0,0,.3);
		z-index: 99;
		display: none;
	}
	.daqs_tcdiv{
		width: 100%;
		height: 100%;
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: center;
	}
	.daqs_tcbox2{
		width:80%;
		height:9.5rem;
		background: url('__PUBLIC__/images/bzjp_img/0902/tc@2x.png') no-repeat;
		background-size: 100% 100%;
		position: relative;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: flex-end;
		padding-bottom: 0.3rem;
	}
	.wxtc{
		width:50%;
		margin-top: 0.2rem;
	}
	.colse_tcbox{
		width:0.7rem;
		height:0.7rem;
		position: absolute;
		top: -8%;
		right:1%;
		background: url('__PUBLIC__/images/bzjp_img/0902/gb@2x.png') no-repeat;
		background-size: 100% 100%;
	}
	.dsqs_btn2{
		width:80%;
		margin-top:0.2rem;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}
	.wxh{
		color: #F73636;
		margin-top: 0.1rem;
		font-size: 0.28rem;
	}
	.m1{
		color: #424242;
		font-size: 0.28rem;
		margin-top: 0.3rem;
	}
	.dsqs_msg{
		width:87%;
		font-size: 0.25rem;
		color: #424242;
		line-height: 0.45rem;
	}
	.dsqs_msg span{
		color: #de0003;
	}
	.daqs_alert{
		width: 100%;
		height: 100%;
		position: fixed;
		top: 0;
		left: 0;
		background-color: rgba(0,0,0,.1);
		z-index: 100;
		display: none;
	}
	.daqs_alert_div{
		width: 100%;
		height: 100%;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
	}
	.daqs_alert_box{
		width:4.5rem;
		height:0.8rem;
		background-color: rgba(0,0,0,.7);
		color: #FFFFFF;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		border-radius: 10px;
	}
</style>

 <!--<div class="wxPay_container">-->
    <!--<div class="wxPay_wrap">-->
        <!--<div class="close_bg"></div>-->
        <!--<div class="wxPay_title"><if condition="$znickname eq '匿名'">匿名<else /></if>的测试结果</div>-->
        <!--<div class="wxPay_content">-->
            <!--<div class="wxPay_info">-->
                <!--<p><span class="I_left">姓名：</span><if condition="$znickname eq '匿名'">匿名<else /></if></p>-->
                <!--<P><span class="I_left">性别：</span><if condition="$Think.cookie.zsex eq 1">男<else />女</if></P>-->
                <!--<div class="birth">-->
                    <!--<span class="I_left">出生：</span>-->
                    <!--<div class="I_right">-->
                        <!--<p>公(阳)历 </p>-->
                        <!--<p>农(阴)历 </p>-->
                    <!--</div>-->
                <!--</div>-->
            <!--</div>-->
            <!--<p class="end_content">......</p>-->
            <!--<div class="wxPay_btn weixinzfFH">立即查看全部</div>-->
        <!--</div>-->
    <!--</div>-->
<!--</div>-->


<!--男大师-->
<div class="daqs_tcbg2">
	<div class="daqs_tcdiv">
		<div class="daqs_tcbox2">
			<div class="colse_tcbox" onclick="colsebox2()"></div>
			<div class="dsqs_msg">缘主您好，如果你想找专业命理师<span>具体问题一对一分析</span>，请加知命专业<span>命理大师微信</span></div>
			<div class="m1">已复制成功微信号</div>
			<div class="wxh">GXQM_zz</div>
			<img class="dsqs_btn2" onclick="copyqcwx(),openwx(),pvuvStatistics('jg_indexZf_dkwx')" src="__PUBLIC__/images/bzjp_img/0902/tcan@2x.png" />
			<img class="wxtc" src="__PUBLIC__/images/bzjp_img/0902/wxtc.gif" />
		</div>
	</div>
</div>

<div class="daqs_alert">
	<div class="daqs_alert_div">
		<div class="daqs_alert_box">微信号已复制前往添加好友</div>
	</div>
</div>

<!--女大师-->


<!-- 返回弹窗 优惠券 -->
<!--<div class="discount_container">-->
    <!--<div class="discount_bg"></div>-->
    <!--<div class="discount_content">-->
        <!--<div class="discount_txt">-->
            <!--<p><span class="discount_strong">&lt;!&ndash;{$bztaisui}&ndash;&gt;</span><span class="discount_strong">大师强烈建议你查阅你的年运报告</span>，-->
                <!--特赠送优惠卷一张,可免费或抵扣相应金额。-->
            <!--</p>-->
        <!--</div>-->
        <!--<div class="discount_coupon">-->
            <!--<div class="coupon_money">￥<strong>&lt;!&ndash;{$Think.cookie.discountprice}&ndash;&gt;</strong></div>-->
            <!--<div class="coupon_txt">优惠券</div>-->
        <!--</div>-->
        <!--<div class="discount_bottom">-->
            <!--<if condition="$wxlogin eq 1 ">-->
                <!--<a href="javascript:;" class="discount_btn YHPay">马上使用</a>-->
                <!--<a href="javascript:;" class="discount_btn share_btn">送给朋友用</a>-->
                <!--<else />-->
                <!--<a href="javascript:;" class="discount_btn YHPay">马上使用</a>-->
            <!--</if>-->
        <!--</div>-->
        <!--<div class="discount_close"></div>-->
    <!--</div>-->
<!--</div>-->

<!-- 提示分享 -->
<!--<div class="ts_tc_container">-->
    <!--<div class="ts_tc_bg">-->
        <!--<div class="ts_tc_contnet">点击右上角分享到微信群和朋友圈。</div>-->
    <!--</div>-->
<!--</div>-->

<script>
	function openwx(){
		console.log("openweixin")
		$(".daqs_alert").show();
		setTimeout(function(){ 
			$(".daqs_alert").hide();
			window.location.href = 'weixin://';
		}, 1000);
	}
	function colsebox2(){
		$(".daqs_tcbg2").hide();
	}
	function copyqcwx(){
		var oInput = document.createElement('input');
		oInput.setAttribute('value', 'GXQM_zz');
		oInput.setAttribute('readonly', 'readonly');
		document.body.appendChild(oInput);
		oInput.setSelectionRange(0, 99); // 选择对象
		oInput.select();
		document.execCommand('Copy'); // 执行浏览器复制命令
		oInput.className = 'oInput';
		oInput.style.display='none';
		document.body.removeChild(oInput);
		console.log("copy");
	}
	
    var oldMoney = "<!--{$Think.cookie.price}-->"; //原价
    var discountprice='<!--{$Think.cookie.discountprice}-->';//优惠价格
    var isPayYHJ = "<!--{$discount}-->"; //是否优惠
    var yhMoneyNode = "<span style='font-size:0.24rem;color:#cB2312;'>(已使用"+discountprice+"元优惠券)</span>";
    var channel = "<!--{$channel}-->"; // 渠道
    var channelDiscount='<!--{$channelDiscount}-->';
    var hidePopup='<!--{$Think.cookie.hidePopupNum}-->';
    var QSorderNo='<!--{$Think.cookie.QSorderNo}-->';
    var qudaoJgTypeNum='<!--{$Think.cookie.qudaoJgTypeNum}-->';//1为首页  2为支付页
	
	function pushHistory(){
	    window.history.pushState('index', null, document.URL);   
	}
	function pushHistory2(){
	    window.history.pushState('zhifu', null, document.URL);   
	}
	
    $(function(){
        if(isPayYHJ == 1){
            $('.public_pp_price strong').html('￥'+oldMoney+'元'+yhMoneyNode);
            $('.orderMoney').append(yhMoneyNode);
            $('.YHPay').css('background','rgba(0,0,0,0.7)').text('已使用');
        }

        var sss;
        /*== if(hidePopup==1||QSorderNo==1){

        }else{
            window.history.pushState(null,null,'');
        } */
		
		pushHistory2();
		
        window.addEventListener("popstate", function(e) {
			
			
            if (e.state == null) {
				pvuvStatistics('jg_indexZf_wxtc');
				$.getJSON("<!--{:U('Index/jieguoyeReturn','',false)}-->",function(data){//回调统计入库
				});
				copyqcwx();
                $(".daqs_tcbg2").show();
            } else if (e.state != null && e.state == 'zhifu') {
                window.history.back(-1)
            }
			
            /* if(tcbool){//不触发返回弹窗
                console.log('window.addEventListener')
                window.history.back(-1);
                return;
            } */
			
			//tcbool = true;
			//$(".daqs_tcbg2").show();
			//window.history.pushState(null,null,'');
			
            // 阻止弹窗滚动
//            var scrollTop = window.pageYOffset
//            || document.documentElement.scrollTop
//            || document.body.scrollTop
//            || 0;
//            sss=scrollTop;//保存当前滚动条位置
//            document.body.style.top=-1*scrollTop+"px";
//            document.body.style.position='fixed';

        }, false);
		
        $('.close_bg').on('click',function(){
            $('.wxPay_container').css('display','none');
            document.body.style.overflow='';
            document.body.style.position=null;
            document.body.style.top=null;
            window.scrollTo(0,sss);
            if(channelDiscount==1){
                $('.discount_container').addClass('on');
            }
        })
        $('.discount_close').on('click',function(){
            $('.discount_container').removeClass('on');
        })
        $('.share_btn').on('click',function(){
            $('.ts_tc_container').fadeIn();
        })
        $('.ts_tc_container').on('click',function(){
            $(this).fadeOut();
        })
    });

    // 弹框微信支付
    $(".weixinzfFH").on('click',function(){
        zhifuPopup();
         if(wxlogin==1){//微信支付
            wxzf();
         }else{//微信H5支付
            payMoney('wx');
         }
    });

    function pvuvStatistics(typeName){//pvuv统计
        $.getJSON("<!--{:U('Index/interfacPvUv','',false)}-->",{typeName:typeName},function(data){//点击回调入库
        });
    }


    // 优惠支付
//    $(".YHPay").on('click',function(){
//        if(isPayYHJ == 0){
//            if(wxlogin==1){
//                $.getJSON("<!--{:U('Lnyc2019/payGzh','',false)}-->",{price:discountprice},function(data){//回调入库
//                    WeixinJSBridge.invoke(
//                            'getBrandWCPayRequest', {
//                                "appId":data.appId,     //公众号名称，由商户传入
//                                "timeStamp":data.timeStamp,         //时间戳，自1970年以来的秒数
//                                "nonceStr":data.nonceStr, //随机串
//                                "package":data.package,
//                                "signType":data.signType,         //微信签名方式：
//                                "paySign":data.paySign//微信签名
//                            },
//                            function(res){
//                                if(res.err_msg == "get_brand_wcpay_request:ok" ) {
//                                    location.href="<!--{:U('Lnyc2019/jieguoye','',false)}-->?ordernum=<!--{$Think.cookie.orderid}-->";
//                                }     // 使用以上方式判断前端返回,微信团队郑重提示：res.err_msg将在用户支付成功后返回    ok，但并不保证它绝对可靠。
//                            }
//                    );
//                });
//            }else{
//                $.post("<!--{:U('Index/payReduce','',false)}-->",{price:discountprice},function(data){//回调入库
//                    $('.public_pp_price strong').html('￥'+data+'元'+yhMoneyNode);
//                    $('.orderMoney').text('只需'+data+'元');
//                    $('.orderMoney').append(yhMoneyNode);
//                    $('.YHPay').css('background','rgba(0,0,0,0.7)').text('已使用');
//                    $('#publicPayPopup').show();
//                });
//            }
//        }else{
//            $('#publicPayPopup').show();
//        }
//    });
</script>